package create.he;

import create.he.builder.GeneratorBuilder;
import create.he.common.Constant;
import create.he.entity.ControllerContent;
import create.he.entity.DaoContent;
import create.he.entity.EntityContent;
import create.he.entity.JDBCConfig;
import create.he.entity.ServiceContent;
import create.he.entity.ServiceImplContent;
import create.he.utils.CreateFileUtil;

public class Main {
	public static void main(String[] args) throws Exception {
		GeneratorBuilder builder = new GeneratorBuilder()
				.initByTable("upms_import_record", new JDBCConfig("192.168.10.80", 3307, "gzqixun-tech-itsm-44523582661854696660", "root", "mysql"))
				.setDefaultPackage("org.gzqixun.itsm.modules.system")
				.setOutPath("/home/heh/下载");
		builder.builder();

		CreateFileUtil.createFile(builder, Constant.TEMPLATE_NAME_ENTITY, EntityContent.class,"v1.0");
		CreateFileUtil.createFile(builder, Constant.TEMPLATE_NAME_ROUTER, ControllerContent.class);
		CreateFileUtil.createFile(builder, Constant.TEMPLATE_NAME_DAO, DaoContent.class);
		CreateFileUtil.createFile(builder, Constant.TEMPLATE_NAME_SERVICE, ServiceContent.class);
		CreateFileUtil.createFile(builder, Constant.TEMPLATE_NAME_SERVICE_IMPL, ServiceImplContent.class);
	}
}
